#ifndef _XML_IMPORTOR_LISTENER_
#define _XML_IMPORTOR_LISTENER_

#include <node.h>
#include "v8.h"
#include "uv.h"

#undef WINAPI_FAMILY

#include "kernel/dir.h"
#include "kernel/file.h"
#include "kernel/OgreStringVector.h"
#include "udataset/mdb/PModelXmlImportor.h"

using namespace std;
using namespace v8;

using namespace FD::Utility::Dataset;
using namespace FD::Utility::DB;
using namespace FD::Kernel;

/**
 * XML导入进度监听器
 * 只有异步导入时才需要此对象
 * */
class XmlImportorListener : public PModelXmlListener
{
  public:
	//开始处理数据
	virtual void notifyBeginImportFile(const FD::Kernel::FdMultiByteString &msg, UINT32 currentNo, UINT32 totalNum)
	{
	}

	//结束处理数据
	virtual void notifyEndImportFile(const FD::Kernel::FdMultiByteString &msg, UINT32 currentNo, UINT32 totalNum, bool suc)
	{
		if (currentNo == totalNum)
		{
			//监听到结束，关闭库，释放内存
			//dbimp->closeSourceDB();
			//delete dbimp;
		}
	}
};

#endif // !_XML_IMPORTOR_LISTENER_